package com.moarea.app.dao;

import com.moarea.app.model.BaseCommonquery;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import tk.mybatis.mapper.common.Mapper;

import java.util.Collection;
import java.util.List;
import java.util.Map;

@Repository("BaseCommonqueryMapper")
public interface BaseCommonqueryMapper extends Mapper<BaseCommonquery> {
    Collection<? extends Map<String, Object>> listCommonQueryTypes(@Param("pId") String pId);

    List<BaseCommonquery> selectNodeByParentid(@Param("pId") String pId);

    BaseCommonquery selectByCode(@Param("CODE") String code);

    List<Map<String, Object>> getConditionsByCode(@Param("CODE") String code);

    List<Map<String, Object>> getResultsByCode(@Param("CODE") String code);

    Integer selectCountByCode(@Param("CODE") String code, @Param("ID") String id);

    List<Map<String,Object>> selectBySql(String selectSql);

    void deleteByList(List<String> list);

    Integer isGroup(@Param("PARENTID") String PARENTID);

    String getNameByPageId(@Param("pageId") String pageId);
}